<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      5.6.&nbsp;Linux-4.9.9 API Headers
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body class="lfs" id="lfs-8.0-systemd">
    <div class="navheader">
      <h4>
        Linux From Scratch - Version 8.0-systemd
      </h4>
      <h3>
        Chapter&nbsp;5.&nbsp;Constructing a Temporary System
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="gcc-pass1.html" title=
          "GCC-6.3.0 - Pass 1">Prev</a>
          <p>
            GCC-6.3.0 - Pass 1
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="glibc.html" title="Glibc-2.25">Next</a>
          <p>
            Glibc-2.25
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter05.html" title=
          "Chapter&nbsp;5.&nbsp;Constructing a Temporary System">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 8.0-systemd">Home</a>
        </li>
      </ul>
    </div>
    <div class="wrap" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="ch-tools-linux-headers" name="ch-tools-linux-headers"></a>5.6.
        Linux-4.9.9 API Headers
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <p>
          The Linux API Headers (in linux-4.9.9.tar.xz) expose the kernel's
          API for use by Glibc.
        </p>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Approximate build time:</strong>
              <span class="segbody">less than 0.1 SBU</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Required disk space:</strong>
              <span class="segbody">771 MB</span>
            </div>
          </div>
        </div>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          5.6.1. Installation of Linux API Headers
        </h2>
        <p>
          The Linux kernel needs to expose an Application Programming
          Interface (API) for the system's C library (Glibc in LFS) to use.
          This is done by way of sanitizing various C header files that are
          shipped in the Linux kernel source tarball.
        </p>
        <p>
          Make sure there are no stale files embedded in the package:
        </p>
        <pre class="userinput">
<kbd class="command">make mrproper</kbd>
</pre>
        <p>
          Now extract the user-visible kernel headers from the source. They
          are placed in an intermediate local directory and copied to the
          needed location because the extraction process removes any existing
          files in the target directory.
        </p>
        <pre class="userinput">
<kbd class="command">make INSTALL_HDR_PATH=dest headers_install
</kbd><kbd class="command">cp -rv dest/include/* /tools/include</kbd>
</pre>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <p>
          Details on this package are located in <a class="xref" href=
          "../chapter06/linux-headers.html#contents-linux-headers" title=
          "6.7.2.&nbsp;Contents of Linux API Headers">Section&nbsp;6.7.2,
          &ldquo;Contents of Linux API Headers.&rdquo;</a>
        </p>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="gcc-pass1.html" title=
          "GCC-6.3.0 - Pass 1">Prev</a>
          <p>
            GCC-6.3.0 - Pass 1
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="glibc.html" title="Glibc-2.25">Next</a>
          <p>
            Glibc-2.25
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter05.html" title=
          "Chapter&nbsp;5.&nbsp;Constructing a Temporary System">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 8.0-systemd">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
